let initState = {
  loginState:false//登录状态默认为false
}
export const userReducer = (state = initState, action) => {
  switch (action.type) {
    // 修改登录状态-只有为true的时候才能进入私有路由
    case 'SET_LOGIN_STATE':
        return {...state,loginState:action.payload} 
    default:
      return state
  }
}